<div class="col-sm-12">
  <div class="box">
    <div class="box-body">
      <div class="col-sm-12 nopadding-left">
        <div class="bottom12">
          <ul class="nav nav-tabs">
            <li id='chooseTabOne' class="active"><a href="#box_tab1" data-toggle="tab" {{action 'chooseTab' "chooseTabOne"}}>
               <span class="hidden-inline-mobile">老人呼叫预警</span></a>
            </li>
            <li id='chooseTabTwo' class=""><a href="#box_tab2" data-toggle="tab" {{action 'chooseTab' "chooseTabTwo"}} >
             <span class="hidden-inline-mobile">床垫动态预警</span></a>
            </li>
            <li id='chooseTabThree' class=""><a href="#box_tab3" data-toggle="tab" {{action 'chooseTab' "chooseTabThree"}} >
             <span class="hidden-inline-mobile">睡眠信息</span></a>
            </li>
          </ul>
            <div class="clear"></div>
        </div>
      </div>
    <div id="datatable1_wrapper" class="dataTables_wrapper form-inline" role="grid">
    	<div class="row">
        <!--搜索-->
        <!--搜索-->
        <div class="col-sm-3">
          <div class="input-group full-width">
            {{#power-select class="input-group-content full-width" placeholder='老人姓名' options=customerList selected=defaultCustomer searchField="sortName"
            noMatchesMessage="没有相关内容"	allowClear=true	onchange=(action "selectCustomer" ) as |customer|}}
              {{customer.name}}
            {{/power-select}}
          </div>
        </div>
        {{#if (eq chooseTabFlag "chooseTabThree")}}
          <div class="col-sm-6 nopadding-left">
              {{callbusi/time-search class="inline-block" text='按统计日期搜索' dateShow=dateShow chooseDate=chooseDate search="search"
              submmit="submmit" emptied='emptied' changeBeginDateAction='changeBeginDateAction' changeEndDateAction='changeEndDateAction'}}
          </div>
        {{else}}
          <div class="col-sm-6 nopadding-left">
              {{callbusi/time-search class="inline-block" text='按预警时间搜索' dateShow=dateShow chooseDate=chooseDate search="search"
              submmit="submmit" emptied='emptied' changeBeginDateAction='changeBeginDateAction' changeEndDateAction='changeEndDateAction'}}
          </div>
        {{/if}}
        <!-- <div class="user-add-btn col-sm-3 pull-right nopadding-right">
          {{#ui/mix-button class=" user-btn pull-right" iconClass="fa-plus"  text='新增预警'  clickAction="toDetailPage" toDetailPage="toDetailPage" style="padding-right:0px;margin-right:0px;"}}
          {{/ui/mix-button}}
    	  </div> -->

    	  <!--搜索-->
    	</div>
      <table id="datatable1" cellpadding="0" cellspacing="0" border="0"  class="datatable table table-bordered table-hover dataTable mt15" aria-describedby="datatable1_info">
        <thead>
          <tr role="row">
            {{#if (eq chooseTabFlag "chooseTabOne")}}
              <th rowspan="1" colspan="1" width="">用户姓名</th>
              <th rowspan="1" colspan="1" width="">床位号</th>
              <th rowspan="1" colspan="1" width="">预警时间</th>
              <th rowspan="1" colspan="1" width="">预警说明</th>
              <th rowspan="1" colspan="1" class="" width="">处理人</th>
          		<th rowspan="1" colspan="1" class="" width="">处理状态</th>
              <th rowspan="1" colspan="1" class="" width="">复位时间</th>
          		<th rowspan="1" colspan="1" class="" width="">处理时间</th>
            {{/if}}
            {{#if (eq chooseTabFlag "chooseTabTwo")}}
            <th rowspan="1" colspan="1" width="">用户姓名</th>
            <th rowspan="1" colspan="1" width="">床位号</th>
              <th rowspan="1" colspan="1" width="">预警时间</th>
              <th rowspan="1" colspan="1" width="">预警说明</th>
            {{/if}}
            {{#if (eq chooseTabFlag "chooseTabThree")}}
            <th rowspan="1" colspan="1" width="">用户姓名</th>
            <th rowspan="1" colspan="1" width="">床位号</th>
              <th rowspan="1" colspan="1" class="" width="">统计日期</th>
              <th rowspan="1" colspan="1" class="" width="">深睡眠时长</th>
              <th rowspan="1" colspan="1" class="" width="">浅睡眠时长</th>
              <th rowspan="1" colspan="1" class="" width="">总睡眠时长</th>
            {{/if}}
          </tr>
        </thead>
        {{#if warningList}}
        {{log "warningList in hbs:" warningList}}
      <tbody role="alert" aria-live="polite" aria-relevant="all" class="">
          {{#each warningList as |warning|}}
          <tr class="gradeA odd" {{action "toDetailPage" warning on="click"}}>
            {{#if (eq chooseTabFlag "chooseTabOne")}}
              <td class=" ellipsis sorting_1">{{warning.caller.name}}</td>
              <td class=" ellipsis ">{{warning.bed.roomBedName}}</td>
              <td class=" ellipsis">{{warning.createTimeString}}</td>
              <td class=" ellipsis ">{{warning.reason}}</td>
              <td class="ellipsis">{{warning.operater.name}}</td>
        	    <td class="ellipsis">
            		<span class="ellipsis floatLeft width90">{{warning.flag.typename}}</span>
        	    </td>
              <td class=" ellipsis">{{warning.cancelTimeStr}}</td>
              <td class="">{{warning.operateTimeShortString}}</td>
            {{/if}}
            {{#if (eq chooseTabFlag "chooseTabTwo")}}
              <td class=" ellipsis sorting_1">{{warning.caller.name}}</td>
              <td class=" ellipsis ">{{warning.bed.roomBedName}}</td>
              <td class=" ellipsis">{{warning.createTimeString}}</td>
              <td class=" ellipsis ">{{warning.reason}}</td>
            {{/if}}
            {{#if (eq chooseTabFlag "chooseTabThree")}}
              <td class=" ellipsis sorting_1">{{warning.customer.name}}</td>
              <td class=" ellipsis ">{{warning.bed.roomBedName}}</td>
              <td class=" ellipsis">{{warning.createDateStr}}</td>
              <td class=" ellipsis">{{warning.deepSleepMinsFormat}}</td>
              <td class=" ellipsis">{{warning.lightSleepMinsFormat}}</td>
              <td class=" ellipsis">{{warning.allSleepMinsFormat}}</td>
            {{/if}}
      	  </tr>
          {{/each}}
       </tbody>
       {{else}}
       {{/if}}
        </table>
        {{#if warningList }}
            {{page-numbers content=warningList showFL=true numPagesToShow=5}}
            {{else}}
                <h1 class="col-sm-12 center unTask"></h1>
        {{/if}}
      </div>
    </div>
  </div>
  <!-- /BOX -->
</div>
